<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>账户设置 | StudyRaid</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        :root {
            --bg-primary: #0d1117;
            --bg-secondary: #161b22;
            --bg-tertiary: #21262d;
            --text-primary: #f0f6fc;
            --text-secondary: #c9d1d9;
            --text-tertiary: #8b949e;
            --border-color: #30363d;
            --accent-color: #58a6ff;
            --success-color: #3fb950;
            --warning-color: #d29922;
            --danger-color: #f85149;
            --border-radius: 6px;
            --shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
        }

        body {
            background-color: var(--bg-primary);
            color: var(--text-primary);
            line-height: 1.5;
        }

        .container {
            max-width: 1280px;
            margin: 0 auto;
            padding: 0 20px;
        }

        /* 导航栏样式 */
        header {
            background-color: var(--bg-secondary);
            border-bottom: 1px solid var(--border-color);
            position: sticky;
            top: 0;
            z-index: 100;
        }

        .navbar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 16px 0;
        }

        .logo {
            font-size: 24px;
            font-weight: 700;
            color: var(--text-primary);
            text-decoration: none;
            display: flex;
            align-items: center;
        }

        .logo i {
            margin-right: 10px;
            color: var(--accent-color);
        }

        .nav-links {
            display: flex;
            gap: 24px;
        }

        .nav-links a {
            color: var(--text-secondary);
            text-decoration: none;
            font-size: 14px;
            transition: color 0.2s;
        }

        .nav-links a:hover,
        .nav-links a.active {
            color: var(--text-primary);
        }

        .user-menu {
            display: flex;
            align-items: center;
            gap: 16px;
        }

        .search-box {
            position: relative;
        }

        .search-box input {
            background-color: var(--bg-tertiary);
            border: 1px solid var(--border-color);
            border-radius: var(--border-radius);
            padding: 8px 12px;
            padding-left: 32px;
            color: var(--text-primary);
            width: 240px;
            font-size: 14px;
        }

        .search-box i {
            position: absolute;
            left: 10px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-tertiary);
        }

        .user-avatar {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background-color: var(--accent-color);
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            cursor: pointer;
        }

        /* 个人中心布局 */
        .profile-container {
            display: grid;
            grid-template-columns: 300px 1fr;
            gap: 24px;
            margin: 24px 0;
        }

        /* 侧边栏 */
        .profile-sidebar {
            background-color: var(--bg-secondary);
            border-radius: var(--border-radius);
            border: 1px solid var(--border-color);
            overflow: hidden;
            height: fit-content;
            position: sticky;
            top: 90px;
        }

        .profile-info {
            padding: 24px;
            text-align: center;
            border-bottom: 1px solid var(--border-color);
        }

        .profile-avatar {
            width: 80px;
            height: 80px;
            border-radius: 50%;
            background-color: var(--accent-color);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 28px;
            font-weight: bold;
            margin: 0 auto 16px;
        }

        .profile-name {
            font-size: 20px;
            font-weight: 600;
            margin-bottom: 4px;
        }

        .profile-username {
            color: var(--text-tertiary);
            font-size: 14px;
            margin-bottom: 16px;
        }

        .profile-bio {
            color: var(--text-secondary);
            font-size: 14px;
            line-height: 1.5;
        }

        .profile-stats {
            display: flex;
            justify-content: space-around;
            padding: 16px;
            border-bottom: 1px solid var(--border-color);
        }

        .stat-item {
            text-align: center;
        }

        .stat-value {
            font-size: 20px;
            font-weight: 600;
            color: var(--accent-color);
        }

        .stat-label {
            font-size: 12px;
            color: var(--text-tertiary);
        }

        .profile-menu {
            padding: 16px 0;
        }

        .menu-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px 20px;
            color: var(--text-secondary);
            text-decoration: none;
            transition: all 0.2s;
            cursor: pointer;
        }

        .menu-item:hover,
        .menu-item.active {
            background-color: var(--bg-tertiary);
            color: var(--text-primary);
        }

        .menu-item i {
            width: 20px;
            text-align: center;
        }

        /* 主要内容区域 */
        .profile-content {
            background-color: var(--bg-secondary);
            border-radius: var(--border-radius);
            border: 1px solid var(--border-color);
            overflow: hidden;
        }

        .content-section {
            padding: 24px;
            border-bottom: 1px solid var(--border-color);
        }

        .content-section:last-child {
            border-bottom: none;
        }

        .section-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }

        .section-title {
            font-size: 20px;
            font-weight: 600;
        }

        .section-action {
            color: var(--accent-color);
            font-size: 14px;
            text-decoration: none;
        }

        /* 设置表单 */
        .form-group {
            margin-bottom: 20px;
        }

        .form-label {
            display: block;
            margin-bottom: 8px;
            font-weight: 500;
        }

        .form-input {
            width: 100%;
            background-color: var(--bg-tertiary);
            border: 1px solid var(--border-color);
            border-radius: var(--border-radius);
            padding: 12px;
            color: var(--text-primary);
            font-size: 14px;
        }

        .form-input:focus {
            outline: none;
            border-color: var(--accent-color);
        }

        .form-textarea {
            min-height: 100px;
            resize: vertical;
        }

        .form-actions {
            display: flex;
            gap: 12px;
            margin-top: 24px;
        }

        .btn {
            padding: 10px 20px;
            border-radius: var(--border-radius);
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            border: none;
            transition: all 0.2s;
            text-align: center;
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            gap: 8px;
        }

        .btn-primary {
            background-color: var(--accent-color);
            color: white;
        }

        .btn-primary:hover {
            background-color: #4a93e0;
        }

        .btn-secondary {
            background-color: var(--bg-tertiary);
            color: var(--text-primary);
            border: 1px solid var(--border-color);
        }

        .btn-secondary:hover {
            background-color: var(--bg-secondary);
        }

        /* 设置选项 */
        .settings-options {
            display: flex;
            flex-direction: column;
            gap: 16px;
        }

        .setting-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 16px;
            background-color: var(--bg-tertiary);
            border-radius: var(--border-radius);
        }

        .setting-info {
            flex: 1;
        }

        .setting-title {
            font-weight: 500;
            margin-bottom: 4px;
        }

        .setting-description {
            color: var(--text-tertiary);
            font-size: 14px;
        }

        /* 切换开关 */
        .toggle-switch {
            position: relative;
            display: inline-block;
            width: 44px;
            height: 24px;
        }

        .toggle-switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }

        .toggle-slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: var(--bg-secondary);
            border: 1px solid var(--border-color);
            transition: .4s;
            border-radius: 24px;
        }

        .toggle-slider:before {
            position: absolute;
            content: "";
            height: 16px;
            width: 16px;
            left: 4px;
            bottom: 3px;
            background-color: var(--text-tertiary);
            transition: .4s;
            border-radius: 50%;
        }

        input:checked+.toggle-slider {
            background-color: var(--accent-color);
            border-color: var(--accent-color);
        }

        input:checked+.toggle-slider:before {
            transform: translateX(20px);
            background-color: white;
        }

        /* 页脚 */
        footer {
            border-top: 1px solid var(--border-color);
            padding: 24px 0;
            margin-top: 40px;
            text-align: center;
            color: var(--text-tertiary);
            font-size: 14px;
        }

        /* 响应式设计 */
        @media (max-width: 1024px) {
            .profile-container {
                grid-template-columns: 1fr;
            }

            .profile-sidebar {
                order: -1;
                position: static;
            }
        }

        @media (max-width: 768px) {
            .navbar {
                flex-direction: column;
                gap: 16px;
            }

            .nav-links {
                order: 3;
                width: 100%;
                justify-content: center;
            }

            .search-box input {
                width: 200px;
            }

            .form-actions {
                flex-direction: column;
            }

            .form-actions .btn {
                width: 100%;
                justify-content: center;
            }
        }
    </style>
</head>

<body>
    <!-- 导航栏 -->
    <header>
        <div class="container">
            <nav class="navbar">
                <a href="index.html" class="logo">
                    <i class="fas fa-graduation-cap"></i>
                    StudyRaid
                </a>

                <div class="nav-links">
                    <a href="my-courses.html">我的课程</a>
                    <a href="explore.html">发现</a>
                    <a href="learning-path.html">学习路径</a>
                    <a href="profile.html" class="active">个人中心</a>
                </div>

                <div class="user-menu">
                    <div class="search-box">
                        <i class="fas fa-search"></i>
                        <input type="text" placeholder="搜索课程...">
                    </div>
                    <div class="user-avatar">JS</div>
                </div>
            </nav>
        </div>
    </header>

    <!-- 个人中心内容 -->
    <main class="container">
        <div class="profile-container">
            <!-- 侧边栏 -->
            <div class="profile-sidebar">
                <div class="profile-info">
                    <div class="profile-avatar">JS</div>
                    <h2 class="profile-name">张三</h2>
                    <p class="profile-username">@zhangsan</p>
                    <p class="profile-bio">前端开发工程师 | 终身学习者 | 热爱编程与分享</p>
                </div>

                <div class="profile-stats">
                    <div class="stat-item">
                        <div class="stat-value">13</div>
                        <div class="stat-label">课程</div>
                    </div>
                    <div class="stat-item">
                        <div class="stat-value">65%</div>
                        <div class="stat-label">完成率</div>
                    </div>
                    <div class="stat-item">
                        <div class="stat-value">42</div>
                        <div class="stat-label">学习天数</div>
                    </div>
                </div>

                <div class="profile-menu">
                    <a href="profile.html" class="menu-item">
                        <i class="fas fa-user"></i>
                        <span>个人信息</span>
                    </a>
                    <a href="my-stat.html" class="menu-item">
                        <i class="fas fa-chart-line"></i>
                        <span>学习统计</span>
                    </a>
                    <a href="my-cert.html" class="menu-item">
                        <i class="fas fa-certificate"></i>
                        <span>我的证书</span>
                    </a>
                    <a href="account-settings.html" class="menu-item active">
                        <i class="fas fa-cog"></i>
                        <span>账户设置</span>
                    </a>
                    <a href="help.html" class="menu-item">
                        <i class="fas fa-question-circle"></i>
                        <span>帮助与支持</span>
                    </a>
                    <a href="logout.html" class="menu-item">
                        <i class="fas fa-sign-out-alt"></i>
                        <span>退出登录</span>
                    </a>
                </div>
            </div>

            <!-- 主要内容区域 -->
            <div class="profile-content">
                <!-- 账户设置部分 -->
                <div class="content-section">
                    <div class="section-header">
                        <h3 class="section-title">账户设置</h3>
                    </div>

                    <div class="form-group">
                        <label class="form-label">用户名</label>
                        <input type="text" class="form-input" value="zhangsan">
                    </div>

                    <div class="form-group">
                        <label class="form-label">显示名称</label>
                        <input type="text" class="form-input" value="张三">
                    </div>

                    <div class="form-group">
                        <label class="form-label">电子邮箱</label>
                        <input type="email" class="form-input" value="zhangsan@example.com">
                    </div>

                    <div class="form-group">
                        <label class="form-label">个人简介</label>
                        <textarea class="form-input form-textarea">前端开发工程师 | 终身学习者 | 热爱编程与分享</textarea>
                    </div>

                    <div class="form-actions">
                        <button class="btn btn-primary">保存更改</button>
                        <button class="btn btn-secondary">取消</button>
                    </div>
                </div>

                <!-- 通知设置部分 -->
                <div class="content-section">
                    <div class="section-header">
                        <h3 class="section-title">通知设置</h3>
                    </div>

                    <div class="settings-options">
                        <div class="setting-item">
                            <div class="setting-info">
                                <div class="setting-title">课程更新通知</div>
                                <div class="setting-description">当您关注的课程有新内容时发送通知</div>
                            </div>
                            <label class="toggle-switch">
                                <input type="checkbox" checked>
                                <span class="toggle-slider"></span>
                            </label>
                        </div>

                        <div class="setting-item">
                            <div class="setting-info">
                                <div class="setting-title">学习提醒</div>
                                <div class="setting-description">定期提醒您继续学习未完成的课程</div>
                            </div>
                            <label class="toggle-switch">
                                <input type="checkbox" checked>
                                <span class="toggle-slider"></span>
                            </label>
                        </div>

                        <div class="setting-item">
                            <div class="setting-info">
                                <div class="setting-title">邮件通知</div>
                                <div class="setting-description">通过电子邮件接收重要通知和课程更新</div>
                            </div>
                            <label class="toggle-switch">
                                <input type="checkbox">
                                <span class="toggle-slider"></span>
                            </label>
                        </div>

                        <div class="setting-item">
                            <div class="setting-info">
                                <div class="setting-title">促销信息</div>
                                <div class="setting-description">接收课程优惠和新课程推荐</div>
                            </div>
                            <label class="toggle-switch">
                                <input type="checkbox">
                                <span class="toggle-slider"></span>
                            </label>
                        </div>
                    </div>
                </div>

                <!-- 隐私设置部分 -->
                <div class="content-section">
                    <div class="section-header">
                        <h3 class="section-title">隐私设置</h3>
                    </div>

                    <div class="settings-options">
                        <div class="setting-item">
                            <div class="setting-info">
                                <div class="setting-title">公开学习档案</div>
                                <div class="setting-description">允许其他用户查看您的学习进度和成就</div>
                            </div>
                            <label class="toggle-switch">
                                <input type="checkbox" checked>
                                <span class="toggle-slider"></span>
                            </label>
                        </div>

                        <div class="setting-item">
                            <div class="setting-info">
                                <div class="setting-title">显示在线状态</div>
                                <div class="setting-description">向其他用户显示您当前是否在线</div>
                            </div>
                            <label class="toggle-switch">
                                <input type="checkbox">
                                <span class="toggle-slider"></span>
                            </label>
                        </div>

                        <div class="setting-item">
                            <div class="setting-info">
                                <div class="setting-title">允许私信</div>
                                <div class="setting-description">允许其他用户向您发送私信</div>
                            </div>
                            <label class="toggle-switch">
                                <input type="checkbox" checked>
                                <span class="toggle-slider"></span>
                            </label>
                        </div>
                    </div>
                </div>

                <!-- 安全设置部分 -->
                <div class="content-section">
                    <div class="section-header">
                        <h3 class="section-title">安全设置</h3>
                    </div>

                    <div class="form-group">
                        <label class="form-label">当前密码</label>
                        <input type="password" class="form-input" placeholder="输入当前密码">
                    </div>

                    <div class="form-group">
                        <label class="form-label">新密码</label>
                        <input type="password" class="form-input" placeholder="输入新密码">
                    </div>

                    <div class="form-group">
                        <label class="form-label">确认新密码</label>
                        <input type="password" class="form-input" placeholder="再次输入新密码">
                    </div>

                    <div class="form-actions">
                        <button class="btn btn-primary">更新密码</button>
                    </div>
                </div>

                <!-- 账户操作部分 -->
                <div class="content-section">
                    <div class="section-header">
                        <h3 class="section-title">账户操作</h3>
                    </div>

                    <div class="settings-options">
                        <div class="setting-item">
                            <div class="setting-info">
                                <div class="setting-title">导出学习数据</div>
                                <div class="setting-description">下载您的学习历史、进度和证书信息</div>
                            </div>
                            <button class="btn btn-secondary">导出数据</button>
                        </div>

                        <div class="setting-item">
                            <div class="setting-info">
                                <div class="setting-title">删除账户</div>
                                <div class="setting-description">永久删除您的账户和所有相关数据</div>
                            </div>
                            <button class="btn"
                                style="background-color: var(--danger-color); color: white;">删除账户</button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </main>

    <!-- 页脚 -->
    <footer>
        <div class="container">
            <p>© 2023 StudyRaid. 保留所有权利。</p>
            <p>采用 GitHub 深色风格设计</p>
        </div>
    </footer>

    <script>
        // 菜单项点击功能
        document.querySelectorAll('.menu-item').forEach(item => {
            item.addEventListener('click', function () {
                document.querySelectorAll('.menu-item').forEach(i => {
                    i.classList.remove('active');
                });
                this.classList.add('active');
            });
        });

        // 保存更改按钮功能
        document.querySelectorAll('.btn-primary').forEach(button => {
            button.addEventListener('click', function () {
                if (this.textContent === '保存更改') {
                    alert('个人信息已更新');
                } else if (this.textContent === '更新密码') {
                    alert('密码已更新');
                }
            });
        });

        // 导出数据按钮功能
        document.querySelector('.btn-secondary').addEventListener('click', function () {
            alert('开始导出学习数据，请稍候...');
            // 实际应用中这里会触发数据导出流程
        });

        // 删除账户按钮功能
        document.querySelector('[style*="background-color: var(--danger-color)"]').addEventListener('click', function () {
            if (confirm('确定要删除账户吗？此操作不可撤销。')) {
                alert('账户删除请求已提交，我们将通过邮件与您确认');
                // 实际应用中这里会触发账户删除流程
            }
        });
    </script>
</body>

</html>